<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<!--新增CSS-->
		<link rel="stylesheet" href="../css/diystyle.css" />
		<!--标准mui.css-->
		<link rel="stylesheet" href="../css/mui.min.css">
		<!--App自定义的css-->
		<link rel="stylesheet" type="text/css" href="../css/app.css" />
		<script>
			window.onload = function() {
				autoHeight();
			}
			window.onresize = function() {
				autoHeight();
			}

			function autoHeight() {
				var winHeight = document.documentElement.clientHeight;
				for (var i = 1; i < 5; i++) {
					document.getElementById("item" + i + "mobile").style.height = winHeight + 'px';
				}
			}
		</script>

	</head>

	<body>

		<style>
			.mui-control-content {
				background-color: white;
				min-height: 215px;
			}
			
			.mui-control-content .mui-loading {
				margin-top: 50px;
			}
		</style>
		<header id="header" class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">安检工单</h1>
			<button class="mui-btn mui-btn-blue mui-btn-link mui-pull-right">排序</button>
		</header>
		<div class="mui-content">
			<div id="slider" class="mui-slider">
				<div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
					<a class="mui-control-item" href="#item1mobile">
				待安检(7)
			</a>
					<a class="mui-control-item" href="#item2mobile">
				已安检(5)
			</a>
					<a class="mui-control-item" href="#item3mobile">
				合格(5)
			</a>
					<a class="mui-control-item" href="#item4mobile">
				疑难(5)
			</a>
				</div>
				<div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-3"></div>
				<div class="mui-slider-group">
					<div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
						<div id="scroll1" class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell">
										<a class="mui-navigate-right" href="wait_check_list.html">
											<div class="mui-media-body">
												<table class="list-table">
													<tr>
														<td class="list-table-di">XX区XXX街道XXX小区</td>
														<td class="list-table-hu">7户</td>
														<td class="list-table-shijian"></td>
													</tr>
												</table>
											</div>
										</a>
									</li>

									<li class="mui-table-view-cell">
										<a class="mui-navigate-right" href="wait_check_list.html">
											<div class="mui-media-body">
												<table class="list-table">
													<tr>
														<td class="list-table-di">XX区XXX街道XXX小小小小区</td>
														<td class="list-table-hu">7户</td>
														<td class="list-table-shijian">2015-10-25</td>
													</tr>
												</table>
											</div>
										</a>
									</li>

									<li class="mui-table-view-cell">
										<a class="mui-navigate-right" href="wait_check_list.html">
											<div class="mui-media-body">
												<table class="list-table">
													<tr>
														<td class="list-table-di">XX区XXX街道XXX小小小小区</td>
														<td class="list-table-hu">7户</td>
														<td class="list-table-shijian">2015-10-25</td>
													</tr>
												</table>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell">
										<a class="mui-navigate-right" href="wait_check_list.html">
											<div class="mui-media-body">
												<table class="list-table">
													<tr>
														<td class="list-table-di">XX区XXX街道XXX小小小小区</td>
														<td class="list-table-hu">7户</td>
														<td class="list-table-shijian">2015-10-25</td>
													</tr>
												</table>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell">
										<a class="mui-navigate-right" href="wait_check_list.html">
											<div class="mui-media-body">
												<table class="list-table">
													<tr>
														<td class="list-table-di">XX区XXX街道XXX大大大大区</td>
														<td class="list-table-hu">7户</td>
														<td class="list-table-shijian">2015-10-25</td>
													</tr>
												</table>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell">
										<a class="mui-navigate-right" href="wait_check_list.html">
											<div class="mui-media-body">
												<table class="list-table">
													<tr>
														<td class="list-table-di">XX区XXX街道XXX小小小小区</td>
														<td class="list-table-hu">7户</td>
														<td class="list-table-shijian">2015-10-25</td>
													</tr>
												</table>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell">
										<a class="mui-navigate-right" href="wait_check_list.html">
											<div class="mui-media-body">
												<table class="list-table">
													<tr>
														<td class="list-table-di">XX区XXX街道XXX小小小小区</td>
														<td class="list-table-hu">7户</td>
														<td class="list-table-shijian">2015-10-25</td>
													</tr>
												</table>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell">
										<a class="mui-navigate-right" href="wait_check_list.html">
											<div class="mui-media-body">
												<table class="list-table">
													<tr>
														<td class="list-table-di">XX区XXX街道XXX小小小小区</td>
														<td class="list-table-hu">7户</td>
														<td class="list-table-shijian">2015-10-25</td>
													</tr>
												</table>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell">
										<a class="mui-navigate-right" href="wait_check_list.html">
											<div class="mui-media-body">
												<table class="list-table">
													<tr>
														<td class="list-table-di">XX区XXX街道XXX小小小小区</td>
														<td class="list-table-hu">7户</td>
														<td class="list-table-shijian">2015-10-25</td>
													</tr>
												</table>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell">
										<a class="mui-navigate-right" href="wait_check_list.html">
											<div class="mui-media-body">
												<table class="list-table">
													<tr>
														<td class="list-table-di">XX区XXX街道XXX小小小小区</td>
														<td class="list-table-hu">7户</td>
														<td class="list-table-shijian">2015-10-25</td>
													</tr>
												</table>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell">
										<a class="mui-navigate-right" href="wait_check_list.html">
											<div class="mui-media-body">
												<table class="list-table">
													<tr>
														<td class="list-table-di">XX区XXX街道XXX小小小小区</td>
														<td class="list-table-hu">7户</td>
														<td class="list-table-shijian">2015-10-25</td>
													</tr>
												</table>
											</div>
										</a>
									</li>

								</ul>
							</div>
						</div>
					</div>
					<div id="item2mobile" class="mui-slider-item mui-control-content">
						<div id="scroll2" class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<div class="mui-loading">
									<div class="mui-spinner">
									</div>
								</div>
							</div>
						</div>

					</div>
					<div id="item3mobile" class="mui-slider-item mui-control-content">
						<div id="scroll3" class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<div class="mui-loading">
									<div class="mui-spinner">
									</div>
								</div>
							</div>
						</div>

					</div>
					<div id="item4mobile" class="mui-slider-item mui-control-content">
						<div id="scroll3" class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<div class="mui-loading">
									<div class="mui-spinner">
									</div>
								</div>
							</div>
						</div>

					</div>
				</div>
			</div>

		</div>
		<script src="../js/mui.min.js"></script>
		<script>
			mui.init({
				swipeBack: false
			});
			(function($) {
				$('.mui-scroll-wrapper').scroll({
					indicators: true //是否显示滚动条
				});
				var html2 = '<ul class="mui-table-view"><li class="mui-table-view-cell"><a class="mui-navigate-right"><div class="mui-media-body"><table><tr><td>XX区XXX街道XXX小区</td><td>&nbsp;&nbsp;&nbsp;</td><td>7户</td><td>&nbsp;&nbsp;&nbsp;</td><td>2015-10-25</td></tr></table></div></a></li><li class="mui-table-view-cell">第二个选项卡子项-2</li><li class="mui-table-view-cell">第二个选项卡子项-3</li><li class="mui-table-view-cell">第二个选项卡子项-4</li><li class="mui-table-view-cell">第二个选项卡子项-5</li></ul>';
				var html3 = '<ul class="mui-table-view"><li class="mui-table-view-cell">第三个选项卡子项-1</li><li class="mui-table-view-cell">第三个选项卡子项-2</li><li class="mui-table-view-cell">第三个选项卡子项-3</li><li class="mui-table-view-cell">第三个选项卡子项-4</li><li class="mui-table-view-cell">第三个选项卡子项-5</li></ul>';
				var html4 = '<ul class="mui-table-view"><li class="mui-table-view-cell">第四个选项卡子项-1</li><li class="mui-table-view-cell">第三个选项卡子项-2</li><li class="mui-table-view-cell">第三个选项卡子项-3</li><li class="mui-table-view-cell">第三个选项卡子项-4</li><li class="mui-table-view-cell">第三个选项卡子项-5</li></ul>';
				var item2 = document.getElementById('item2mobile');
				var item3 = document.getElementById('item3mobile');
				var item4 = document.getElementById('item4mobile');
				document.getElementById('slider').addEventListener('slide', function(e) {
					if (e.detail.slideNumber === 1) {
						if (item2.querySelector('.mui-loading')) {
							setTimeout(function() {
								item2.querySelector('.mui-scroll').innerHTML = html2;
							}, 500);
						}
					} else if (e.detail.slideNumber === 2) {
						if (item3.querySelector('.mui-loading')) {
							setTimeout(function() {
								item3.querySelector('.mui-scroll').innerHTML = html3;
							}, 500);
						}
					} else if (e.detail.slideNumber === 3) {
						if (item4.querySelector('.mui-loading')) {
							setTimeout(function() {
								item4.querySelector('.mui-scroll').innerHTML = html4;
							}, 500);
						}
					}
				});
				var sliderSegmentedControl = document.getElementById('sliderSegmentedControl');
				$('.mui-input-group').on('change', 'input', function() {
					if (this.checked) {
						sliderSegmentedControl.className = 'mui-slider-indicator mui-segmented-control mui-segmented-control-inverted mui-segmented-control-' + this.value;
						//force repaint
						sliderProgressBar.setAttribute('style', sliderProgressBar.getAttribute('style'));
					}
				});
			})(mui);
		</script>

	</body>

</html>